<template>
  <!-- 上传-->
  <uppy-upload
    v-if="['FILE', 'FILE_UPLOAD'].includes(props.columnData.fieldTypeCode)"
    v-model:value="props.itemData[props.columnData.fieldCode]"
    :fileType="props.itemData[props.columnData.fileType] ? props.itemData[props.columnData.fileType].split(',') : ['pdf', 'jpg', 'png']"
    :limit="props.columnData.maxNumber"
    :fileSize="props.columnData.maxLength"
    :disabled="props.columnData.disabled"
    :isTableLine="true"
    @onComplete="
      (val) => {
        props.itemData[props.columnData.fieldCode] = val
        handelChange()
      }
    "
  >
  </uppy-upload>
  <!-- 查看 -->
  <!--  <uppy-upload v-if="props.itemData[props.columnData.fieldCode]" :value="props.itemData[props.columnData.fieldCode]" :isExhibition="true" :isDownload="true">
                  </uppy-upload> -->
</template>

<script setup name="VinputNumber">
import { ref, reactive, computed } from 'vue'
import uppyUpload from '@/components/uppy-upload'
import { mixinsData } from '../hooks/mixinsData'
const date = {
  DATE_RANGE: 'daterange',
  DATA_PICKER: 'date'
}
const props = defineProps({
  columnData: {
    type: Object,
    default: () => {}
  },
  itemData: {
    type: Object,
    default: () => {}
  },
  rules: {
    type: Object,
    default: () => {}
  }
})
const { handelBlur, handelChange } = mixinsData(props.columnData, props.itemData, props.rules)
</script>
<style lang="scss"></style>
